package com.zr.model;
// Generated 2016-10-27 9:52:16 by Hibernate Tools 4.3.1.Final

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Oorder generated by hbm2java
 */
@Entity
@Table(name = "oorder", catalog = "logistics")
public class Oorder implements java.io.Serializable {

	private Integer OId;
	private User user;
	private String OCode;
	private Date OCreatetime;
	private String OReceivename;
	private String OReceivephone;
	private String ORecieveaddr;
	private String OSendname;
	private String OSendphone;
	private String OSendaddr;
	private Date OSendtime;
	private String goodsName;
	private Double goodsWeight;
	private Integer goodsState;
	private Integer OState;

	public Oorder() {
	}

	public Oorder(User user, String OCode, Date OCreatetime, String OReceivename, String OReceivephone,
			String ORecieveaddr, String OSendname, String OSendphone, String OSendaddr, Date OSendtime, Byte pointId,
			String goodsName, Double goodsWeight, Integer goodsState, Integer OState) {
		this.user = user;
		this.OCode = OCode;
		this.OCreatetime = OCreatetime;
		this.OReceivename = OReceivename;
		this.OReceivephone = OReceivephone;
		this.ORecieveaddr = ORecieveaddr;
		this.OSendname = OSendname;
		this.OSendphone = OSendphone;
		this.OSendaddr = OSendaddr;
		this.OSendtime = OSendtime;
		this.goodsName = goodsName;
		this.goodsWeight = goodsWeight;
		this.goodsState = goodsState;
		this.OState = OState;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "o_id", unique = true, nullable = false)
	public Integer getOId() {
		return this.OId;
	}

	public void setOId(Integer OId) {
		this.OId = OId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "u_id")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "o_code", length = 16)
	public String getOCode() {
		return this.OCode;
	}

	public void setOCode(String OCode) {
		this.OCode = OCode;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "o_createtime", length = 19)
	public Date getOCreatetime() {
		return this.OCreatetime;
	}

	public void setOCreatetime(Date OCreatetime) {
		this.OCreatetime = OCreatetime;
	}

	@Column(name = "o_receivename", length = 32)
	public String getOReceivename() {
		return this.OReceivename;
	}

	public void setOReceivename(String OReceivename) {
		this.OReceivename = OReceivename;
	}

	@Column(name = "o_receivephone", length = 16)
	public String getOReceivephone() {
		return this.OReceivephone;
	}

	public void setOReceivephone(String OReceivephone) {
		this.OReceivephone = OReceivephone;
	}

	@Column(name = "o_recieveaddr")
	public String getORecieveaddr() {
		return this.ORecieveaddr;
	}

	public void setORecieveaddr(String ORecieveaddr) {
		this.ORecieveaddr = ORecieveaddr;
	}

	@Column(name = "o_sendname", length = 32)
	public String getOSendname() {
		return this.OSendname;
	}

	public void setOSendname(String OSendname) {
		this.OSendname = OSendname;
	}

	@Column(name = "o_sendphone", length = 16)
	public String getOSendphone() {
		return this.OSendphone;
	}

	public void setOSendphone(String OSendphone) {
		this.OSendphone = OSendphone;
	}

	@Column(name = "o_sendaddr")
	public String getOSendaddr() {
		return this.OSendaddr;
	}

	public void setOSendaddr(String OSendaddr) {
		this.OSendaddr = OSendaddr;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "o_sendtime", length = 19)
	public Date getOSendtime() {
		return this.OSendtime;
	}

	public void setOSendtime(Date OSendtime) {
		this.OSendtime = OSendtime;
	}


	@Column(name = "goods_name")
	public String getGoodsName() {
		return this.goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	@Column(name = "goods_weight", precision = 22, scale = 0)
	public Double getGoodsWeight() {
		return this.goodsWeight;
	}

	public void setGoodsWeight(Double goodsWeight) {
		this.goodsWeight = goodsWeight;
	}

	@Column(name = "goods_state")
	public Integer getGoodsState() {
		return this.goodsState;
	}

	public void setGoodsState(Integer goodsState) {
		this.goodsState = goodsState;
	}

	@Column(name = "o_state")
	public Integer getOState() {
		return this.OState;
	}

	public void setOState(Integer OState) {
		this.OState = OState;
	}

}
